package com.mt.mtyx.common.utils.generate.generate.code;

/**
 * @author WMT
 * @Date 2023/5/26 17:27
 */
public class GenerateCondition {

    public static final int SET = 0;

    public static final int WHERE = 1;

    public static final int ORDER = 2;

    public static final int LIMIT = 3;

    /**
     * 字段名
     */
    private String columnName;

    /**
     * 属性名称
     */
    private String fieldName;

    /**
     * 操作符
     */
    private String operate;

    /**
     * 类型【0 修改，1 过滤，2 排序，3 分页】
     */
    private int type;

    /**
     * 开启降序排序
     */
    private boolean enableDesc;

    public GenerateCondition() {
    }

    public GenerateCondition(String columnName, String fieldName, int type) {
        this.columnName = columnName;
        this.fieldName = fieldName;
        this.type = type;
    }

    public GenerateCondition(String columnName, int type, boolean enableDesc) {
        this.columnName = columnName;
        this.type = type;
        this.enableDesc = enableDesc;
    }

    public GenerateCondition(String columnName, String fieldName, String operate, int type) {
        this.columnName = columnName;
        this.fieldName = fieldName;
        this.operate = operate;
        this.type = type;
    }

    public GenerateCondition(String columnName, String fieldName, String operate, int type, boolean enableDesc) {
        this.columnName = columnName;
        this.fieldName = fieldName;
        this.operate = operate;
        this.type = type;
        this.enableDesc = enableDesc;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getOperate() {
        return operate;
    }

    public void setOperate(String operate) {
        this.operate = operate;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isEnableDesc() {
        return enableDesc;
    }

    public void setEnableDesc(boolean enableDesc) {
        this.enableDesc = enableDesc;
    }
}
